package models;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import play.db.jpa.Model;

@Entity
@Table(name="advert")
public class Advert extends Model{
	
	@ManyToOne
	@JoinColumn(name="adp_id")
	public Adpo adpo;                        //广告位
	@Column(name="adv_tit",length=100)
	public String advTit;                    //广告标题
	@Column(name="adv_det",length=5000)
	public String advDet;                    //广告详情
	@Column(name="adv_href",length=100)
	public String advHref;                   //链接
	@Column(name="adv_desc")
	public int advDesc;                      //排序
	@Column(name="adv_date")
	@Temporal(TemporalType.TIMESTAMP)
	public Date advDate;                     //添加日期
	@Column(name="adv_code")
	public String advCode;                   //广告代码
}
